package com.bxw.forum.utils;

import com.bxw.forum.config.AppConfig;
import com.bxw.forum.model.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class GetRequest {

    public static User getUser(HttpServletRequest request) {
        HttpSession session = request.getSession(false);
        User user = (User) session.getAttribute(AppConfig.USER_SESSION);
        return user;
    }
}
